<template>
	<view class="content">
		<view class="header">
			<text class="day">{{(date.getMonth()+1)+'月'+date.getDate()+'日'}}</text>
			<text class="week">星期{{week}}</text>
			<image src="../../static/images/message.png" alt="" class="message" @click="toPage('../post/message')">
				<text class="messageNum" @click="toPage('../post/message')">7</text>
				<view class="myPost">
					<text class="title" @click="toPage('../post/myPost')">我的岗位</text>
					<image src="../../static/images/toRight.png" alt="" class="right">
				</view>
				<!-- 循环列表 -->
				<view class="postListScoll">
					<view class="postList" @click="toPage('../post/postDetail')">
						<view class="title">
							<text class="subtitle">常规</text>
							<text class="maintitle">【教务处】思想动态观察岗</text>
						</view>
						<view class="info">
							<view class="infoList" style="margin-top: 24rpx;">
								<image src="../../static/images/calendar.png" alt="" class="calendarImg" />
								<text class="infoDetail">08:00-10:00 10:00-12:00 13:00-14:00</text>
							</view>
							<view class="infoList" style="margin-top: 12rpx;">
								<image src="../../static/images/address.png" alt="" class="addressImg" />
								<text class="infoDetail">教师发展中心301</text>
							</view>

						</view>
						<u-button type="primary" class="signIn">签到</u-button>
					</view>

					<view class="postList">
						<view class="title">
							<text class="subtitle">常规</text>
							<text class="maintitle">【教务处】思想动态观察岗</text>
						</view>
						<view class="info">
							<view class="infoList" style="margin-top: 24rpx;">
								<image src="../../static/images/calendar.png" alt="" class="calendarImg" />
								<text class="infoDetail">08:00-10:00 10:00-12:00 13:00-14:00</text>
							</view>
							<view class="infoList" style="margin-top: 12rpx;">
								<image src="../../static/images/address.png" alt="" class="addressImg" />
								<text class="infoDetail">教师发展中心301</text>
							</view>
						</view>

					</view>
				</view>
		</view>
		<view class="module">
			<view @click="toPage('../schedule/calendar')">
				<image src="../../static/images/orderOfTheDay.png" alt="" class="moduleImg" />
				<text>工作日程</text>
			</view>
			<view @click="toPage('../examine/examineList')">
				<image src="../../static/images/approvalRecord.png" alt="" class="moduleImg" />
				<text>审批记录</text>
			</view>
			<view @click="toPage('../salary/salaryList')">
				<image src="../../static/images/salarySettlement.png" alt="" class="moduleImg" />
				<text>薪酬结算</text>
			</view>
			<view @click="toPage('../notes/notesList')">
				<image src="../../static/images/myDiary.png" alt="" class="moduleImg" />
				<text>我的日志</text>
			</view>
		</view>
		<view class="notice">
			<view style="float: left;">
				<image src="../../static/images/bell.png" alt="" class="bell" />
				<text class="subtitle">常规</text>
				<text class="title">【教务处】思想动态观察岗考勤异常</text>
			</view>
			<view style="float: right;">
				<image src="../../static/images/toRightGray.png" mode="" class="toRightGray"></image>
			</view>
		</view>
		<view class="recommend">
			<view class="title">
				<text>推荐岗位</text>
				<view class="more" @click="toPage('../recommend/recommendList')">
					<text>更多</text>
					<image src="../../static/images/toRightGray.png" mode="" class="toRightGray"></image>
				</view>
			</view>

			<view class="recommendPost">
				<view class="recommendPostList">
					<view class="statusLine"></view>
					<view class="status">
						<image src="../../static/images/running.png" alt="" class="statusImg" />
						<text class="running">进行中</text>
					</view>
					<view class="main">
						<view class="title">
							<text class="subtitle">临时</text>
							<text class="maintitle">【教务处】办事大厅助理厅</text>
						</view>
						<view class="department">
							<image src="../../static/images/served.png" alt="" class="served" />
							<text class="departs">新媒体</text>
							<text class="departs">新媒体</text>
							<text class="departs">新媒体</text>
						</view>
						<view class="location">
							<image src="../../static/images/location.png" alt="" class="locationImg" />
							<text>学生活动中心一楼</text>
						</view>
					</view>

					<text class="topRightTips">新生入学用工</text>
					<image src="../../static/images/lock.png" alt="" class="lock" />
				</view>


				<view class="recommendPostList">
					<view class="statusLine"></view>
					<view class="status">
						<image src="../../static/images/over.png" alt="" class="statusImg" />
						<text class="over">已结束</text>
					</view>
					<view class="main">
						<view class="title">
							<text class="subtitle">临时</text>
							<text class="maintitle">【教务处】办事大厅助理厅</text>
						</view>
						<view class="department">
							<image src="../../static/images/served.png" alt="" class="served" />
							<text class="departs">新媒体</text>
							<text class="departs">新媒体</text>
							<text class="departs">新媒体</text>
						</view>
						<view class="location">
							<image src="../../static/images/location.png" alt="" class="locationImg" />
							<text>学生活动中心一楼</text>
						</view>
						<view class="tel">
							<image src="../../static/images/message.png" alt=""
								style="vertical-align:middle;margin-right: 18rpx;width: 48rpx;height: 48rpx;border: 2px solid #EBF5F0;border-radius: 50%;">
								<text>张三瑞</text>
								<text class="line">|</text>
								<image src="../../static/images/tel.png" class="telImg"></image>
								<text>17280340636</text>
						</view>
					</view>
					<text class="topRightTips">迎新</text>
					<!-- <image src="../../static/images/lock.png" alt="" class="lock" /> -->
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				day: '',
				week: '',
			}
		},
		onLoad() {
			this.date = new Date()
			switch (this.date.getDay()) {
				case 0:
					this.week = "日";
					break;
				case 1:
					this.week = "一";
					break;
				case 2:
					this.week = "二";
					break;
				case 3:
					this.week = "三";
					break;
				case 4:
					this.week = "四";
					break;
				case 5:
					this.week = "五";
					break;
				default:
					this.week = "六";
			}
		},
		methods: {
			toPage(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	page {
		background-color: #fff;
	}

	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		.header {
			width: 750rpx;
			height: 414rpx; //414rpx
			background: #4463CC;
			border-radius: 0px 0px 24px 24px;
			position: relative;

			.day {
				margin-top: 36rpx;
				margin-left: 32rpx;
				line-height: 74rpx;
				color: #FFFFFF;
				font-size: 52rpx;
			}

			.week {
				margin-left: 24rpx;
				font-size: 32rpx;
				color: #FFFFFF;
			}

			.message {
				width: 44rpx;
				height: 46rpx;
				float: right;
				margin-top: 50rpx;
				margin-right: 32rpx;
				vertical-align: bottom;
			}

			.messageNum {
				border-radius: 50%;
				width: 28rpx;
				height: 28rpx;
				font-size: 20rpx;
				text-align: center;
				position: absolute;
				right: 22rpx;
				top: 42rpx;
				color: #FFFFFF;
				background: #FF6564;
			}

			.myPost {
				.title {
					margin-left: 32rpx;
					margin-top: 60rpx;
					color: #FFFFFF;
				}

				.right {
					margin-left: 16rpx;
					width: 12rpx;
					height: 24rpx;
				}
			}

			.postListScoll {
				display: flex;
				height: 280rpx;
				padding-bottom: 30rpx;
				overflow-x: auto;
				position: absolute;
				width: 100%;
				top: 248rpx;

				.postList {
					display: flex;
					flex-direction: column;
					font-size: 16px;
					flex-shrink: 0;
					white-space: nowrap;
					margin-left: 32rpx;
					background-color: #fff;
					width: 80%;
					padding: 34rpx 32rpx 22rpx 32rpx;
					border-radius: 16rpx;

					box-shadow: 0px 4px 20px 0px rgba(38, 116, 255, 0.17);

					.title {
						.subtitle {
							font-size: 20rpx;
							color: #FFFFFF;
							border-radius: 16rpx 0px 16rpx 0px;
							background: #EF6850;
							padding: 2rpx 8rpx;
						}

						.maintitle {
							font-weight: 500;
							font-size: 30rpx;
							color: #333333;

						}
					}

					.info {
						.infoList {
							.calendarImg {
								width: 24rpx;
								height: 24rpx;
							}

							.addressImg {
								width: 26rpx;
								height: 30rpx;
							}

							.infoDetail {
								margin-left: 14rpx;
								font-size: 26rpx;
								color: #8D9893;
							}
						}
					}

					.signIn {
						padding: 8rpx 26rpx;
						background-color: #2674FF !important;
						width: 112rpx;
						display: block;

						font-size: 28rpx;
						height: 56rpx;
						color: #FFFFFF;
						border-radius: 28rpx;
						position: absolute;
						top: 174rpx;
						right: 32rpx;
					}
				}
			}
		}

		.module {
			display: flex;
			flex-wrap: nowrap;
			margin: 116rpx 32rpx 0 32rpx;
			text-align: center;
			color: #666666;
			font-size: 24rpx;

			.moduleImg {
				width: 132rpx;
				height: 134rpx;
			}
		}

		.notice {
			margin: 46rpx 32rpx 18rpx 32rpx;
			width: 91%;

			.bell {
				width: 44rpx;
				height: 38rpx;
				margin-right: 12rpx;
				vertical-align: middle;
			}

			.subtitle {
				font-size: 20rpx;
				color: #FFFFFF;
				border-radius: 16rpx 0px 16rpx 0px;
				background: #EF6850;
				padding: 2rpx 8rpx;
			}

			.title {
				font-weight: 400;
				font-size: 26rpx;
				color: #333333;
			}

			.toRightGray {
				width: 12rpx;
				height: 20rpx;
			}
		}

		.recommend {
			background-color: #FAFAFA;
			padding: 42rpx 32rpx 0 32rpx;
			width: 100%;

			.title {
				margin-bottom: 16rpx;

				&>text {
					font-weight: 600;
					font-size: 30rpx;
				}

				.more {
					float: right;
					color: #666666;
					font-size: 24rpx;

					.toRightGray {
						margin-left: 14rpx;
						width: 11rpx;
						height: 20rpx;
					}
				}
			}

			
		}
	}
</style>
